package com.more.datasource.controller;

import com.more.datasource.entity.User;
import com.more.datasource.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/select")
    public User select(Integer id) {
        return userService.selectById(id);
    }

    @RequestMapping("/insert")
    public int insert(){
        return userService.insert();
    }
}
